package com.wandian.news.adapter;

import android.text.Html;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wandian.news.R;
import com.wandian.news.bean.LifeMedicineBean;


/**
 * @author Administrator
 * @date 2019/12/16-13:32
 * @description 适配器
 **/
public class LifeMedicineRecycleAdapter extends BaseQuickAdapter<LifeMedicineBean.NewslistEntity, BaseViewHolder> {

    public LifeMedicineRecycleAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper,LifeMedicineBean.NewslistEntity item) {
        TextView tv_medicine_name = helper.getView(R.id.tv_medicine_name);
        TextView tv_medicine_content = helper.getView(R.id.tv_medicine_content);
        tv_medicine_name.setText("名称："+item.getTitle());
        tv_medicine_content.setText(""+ Html.fromHtml(item.getContent()+""));
    }


}
